import App from "./App"
import CNavbar from "./components/CNavbar/CNavbar.vue"
import Clist from "./components/list/index.vue"
// #ifndef VUE3
import Vue from "vue"
import "./uni.promisify.adaptor"
Vue.config.productionTip = false
App.mpType = "app"
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from "vue"
import "vant/lib/index.css"
import "./styles/common.scss"
uni.showSuccessToast = (title) => {
  uni.showToast({
    title,
    icon: "success"
  })
}
uni.showCToast = (title) => {
  uni.showToast({
    title,
    icon: "none"
  })
}
export function createApp() {
  const app = createSSRApp(App)
  app.component("c-navBar", CNavbar)
  app.component("c-list", Clist)

  return {
    app
  }
}
// #endif
